package com.zhihuishu.micro.course.openapi.course;

import com.zhihuishu.micro.course.openapi.course.dto.CourseFolderDto;
import com.zhihuishu.micro.course.openapi.course.dto.CourseFolderTreeDto;
import com.zhihuishu.remote.RemoteException;
import com.zhihuishu.remote.RemoteResult;

import java.util.List;

/**
 * 文件夹
 */
public interface CCFolderOpenService {
    RemoteResult<CourseFolderDto> createByDto(CourseFolderDto courseChapterDto, long createUserId) throws RemoteException;

    RemoteResult<Void> updateByDto(CourseFolderDto chapter, long updateUserId) throws RemoteException ;
    RemoteResult<CourseFolderDto> updateAndGetByDto(CourseFolderDto chapter, long updateUserId) throws RemoteException ;
    RemoteResult<List<CourseFolderDto>> updateByDtoList(List<CourseFolderDto> dtoList, long updateUserId) throws RemoteException ;
    RemoteResult<Void> updatePrivilageForAllChildren(List<Integer> folderIdList,List<Integer> fileIdList, Integer newPrivilage,long updateUserId) throws RemoteException ;

    RemoteResult<Void> deleteById(Integer folderId, long deleteUserId) throws RemoteException;
    RemoteResult<Void> deleteByIds(List<Integer> folderIds, long deleteUserId) throws RemoteException;

    /**
     * 返回文件目录结构
     * @param courseId
     * @return
     * @throws RemoteException
     */
    RemoteResult<CourseFolderTreeDto> queryCourseFolderTree(long courseId) throws RemoteException ;


}
